home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-05 | 923 b | 53 lines | [MATF/MATL] |
- function [fun,dfun,ifun,x0,m,C,Ax] = zsin
- % Taylor series coefficient lists for several functions.
- % Pm(x) = c(1) + c(2)x + c(2)x^2 + ... + c(m+1)x^m
- % fun is the function, output.
- % dfun is the derivative, output.
- % ifun is the integral, output.
- % x0 is the point of expansion, output.
- % m is the degree of the polynomial, output.
- % C is the coefficient list, output.
- % Ax contains three asis vectors plotting, output.
- x0 = 0;
- m = 25;
- a = 0;
- b = 10;
- ymin = -1.05;
- ymax = 1.05;
- ymin1 = -1.1;
- ymax1 = 1.1;
- ymin2 = -0.1;
- ymax2 = 2.1;
- Ax(1,:) = [a b ymin ymax];
- Ax(2,:) = [a b ymin1 ymax1];
- Ax(3,:) = [a b ymin2 ymax2];
- fun = 'sin(x)';
- dfun = 'cos(x)';
- ifun = '1-cos(x)';
- C = [1/15511210043330985984000000,
- 0,
- -1/25852016738884976640000,
- 0,
- 1/51090942171709440000,
- 0,
- -1/121645100408832000,
- 0,
- 1/355687428096000,
- 0,
- -1/1307674368000,
- 0,
- 1/6227020800,
- 0,
- -1/39916800,
- 0,
- 1/362880,
- 0,
- -1/5040,
- 0,
- 1/120,
- 0,
- -1/6,
- 0,
- 1,
- 0];
-